package com.xbongbong.saas.service;

import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.paas.toolbox.wrap.UserVO;
import com.xbongbong.pro.activity.pojo.dto.ActivityGetDTO;
import com.xbongbong.pro.activity.pojo.dto.ActivityUpgradeHistoryDTO;
import com.xbongbong.pro.activity.pojo.vo.ActivityGetVO;
import com.xbongbong.pro.activity.pojo.vo.ActivityUpgradeHistoryVO;
import com.xbongbong.pro.domain.entity.ActivityEntity;

/**
 * @description: 公告
 * @Author: hongxiao
 * @date: 2019-03-25 14:47
 * @since v1.0
 */
public interface ActivityService {
    /**
     * web端获取公告
     * @param activityGetDTO 入参
     * @return
     * @throws
     *
     * @author hongxiao
     * @date: 2019-03-25 16:36
     * @since v1.0
     * @version v1.0
     */
    ActivityGetVO getActivity(ActivityGetDTO activityGetDTO) throws XbbException;

    /**
     * 公告历史列表
     * @param upgradeHistoryDTO 入参
     * @return
     * @throws
     *
     * @author hongxiao
     * @date: 2019-03-25 21:46
     * @since v1.0
     * @version v1.0
     */
    ActivityUpgradeHistoryVO upgradeHistory(ActivityUpgradeHistoryDTO upgradeHistoryDTO) throws XbbException;

    /**
     * 获取公告
     * @param loginUser 当前登录用户
     * @param platform 平台
     * @return
     * @throws
     *
     * @author hongxiao
     * @date: 2019-03-25 21:25
     * @since v1.0
     * @version v1.0
     */
    ActivityEntity getActivityByUser(UserVO loginUser, String platform, Integer activityType);

    /**
     * 获取最新公告
     * @see com.xbongbong.pro.enums.ActivityTypeEnum
     * @param type 活动类型,参考ActivityTypeEnum
     * @return
     * @throws
     * @author hongxiao
     * @date 2019-09-23 15:08
     * @since v4.3.3
     * @version v4.3.3
     */
    ActivityEntity getLastActivity(Integer type, String corpid);
}
